package com.cloudfun.campusshare.service;

import com.cloudfun.campusshare.common.constant.Code;
import com.cloudfun.campusshare.common.model.dto.CouponCreateDTO;
import com.cloudfun.campusshare.common.model.dto.CouponSearchDTO;
import com.cloudfun.campusshare.common.model.vo.CouponListVO;
import com.cloudfun.campusshare.common.model.vo.CouponSimpleVO;
import com.cloudfun.campusshare.common.response.PageResult;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * Created by CodeGenerator on 2020/06/05
 */
public interface CouponService {

    /**
     * 创建
     *
     * @param couponCreateDTO
     */
    void create(CouponCreateDTO couponCreateDTO);

    /**
     * 修改
     *
     * @param couponCreateDTO
     */
    void modify(CouponCreateDTO couponCreateDTO);

    /**
     * 简单列表
     *
     * @param searchDTO
     * @return
     */
    List<CouponSimpleVO> simpleList(CouponSearchDTO searchDTO);

    /**
     * 分页搜索
     *
     * @param searchDTO
     * @param pageable
     * @return
     */
    PageResult<CouponListVO> search(CouponSearchDTO searchDTO, Pageable pageable);

    /**
     * 删除
     *
     * @param id
     */
    void delete(String id);

    /**
     * 删除
     *
     * @param ids
     */
    Map<Code, Integer> delete(List<String> ids);

    /**
     * 删除
     *
     * @param searchDTO
     */
    Map<Code, Integer> delete(CouponSearchDTO searchDTO);

    /**
     * 删除
     */
    Map<Code, Integer> deleteAll();
}